package Tools;

public class Cone extends StereoscopicGraph {
	private double r;
	private double l;
	private double PI=3.14;
	private double area;
	private double volume;
	public Cone(){
		
	}
	public Cone(String name, double r,double l){
		super(name);
		this.r = r;
		this.l = l;
	}
	
	public double getR() {
		return r;
	}
	public void setR(double r) {
		this.r = r;
	}
	public double getL() {
		return l;
	}
	public void setL(double l) {
		this.l = l;
	}
	public void setArea(double area) {
		this.area = area;
	}
	public void setVolume(double volume) {
		this.volume = volume;
	}
	
	public double Area(){
		area=PI*r*l+r*r*PI;
		String a = String.format("%.2f",area);
		double area = Double.parseDouble(a);
		return area;
	}
	public double Volume(){
		volume=PI*r*r*l*1/3;
		String v = String.format("%.2f",volume);
		double volume = Double.parseDouble(v);
		return volume;
	}
	

}
